From: Wei Liu Date: Fri, 24 Mar 2017 11:34:01 +0000 (+0000) Subject: x86/mm: fix the check in get_pg_owner X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2406 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0e7ffe9604ecd3bf534e0d224025e516f2cbd209;p=xen.git x86/mm: fix the check in get_pg_owner PVH (both v1 and v2) guest is actually an translated guest. It should be able to manipulate page table for other domains when acting as Dom0. The removal of PVHv1 deleted the special case for PVH guest but didn't add a check for HVM guest. Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index a6b2649cda..4dbd24ff87 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3041,7 +3041,7 @@ static struct domain *get_pg_owner(domid_t domid) goto out; } - if ( unlikely(paging_mode_translate(curr)) ) + if ( !is_hvm_domain(curr) && unlikely(paging_mode_translate(curr)) ) { MEM_LOG("Cannot mix foreign mappings with translated domains"); goto out;